//
//  FXCBottomCollectionItem.m
//  Various
//
//  Created by 范新晨 on 16/3/25.
//  Copyright © 2016年 Harword. All rights reserved.
//

#import "FXCBottomCollectionItem.h"
#import <UIImageView+WebCache.h>
#import <Masonry.h>
@interface FXCBottomCollectionItem ()

//@property (nonatomic, strong) UIImageView *iconImage;

@end

@implementation FXCBottomCollectionItem

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.iconImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, FXCWEIGHT / 8, FXCWEIGHT / 8)];
        [self.contentView addSubview:self.iconImage];
        self.layer.cornerRadius = 8;
        self.iconImage.layer.cornerRadius = 8;
    }
    return self;
}

- (void)setModel:(FXCPianoModel *)model{

    [self.iconImage sd_setImageWithURL:[NSURL URLWithString:model.icon_image] placeholderImage:[UIImage imageNamed:@"ic_launcher"]];
    
}
//- (void)layoutSubviews{
//    [super layoutSubviews];
//    [self.iconImage mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.left.right.mas_equalTo(0);
//        make.height.mas_equalTo(10);
//    }];
//}



@end
